﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="TestRun"
    elementFormDefault="qualified"
    xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" 
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    attributeFormDefault="unqualified">
  <xs:element name="TestRun">
    <xs:annotation>
      <xs:documentation>Describes a test run for the SsTestHarness</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="TestName" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="SummaryResultsFile" type="xs:string" minOccurs="1" maxOccurs="1" />
        <xs:element name="InnerTests" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="InnerTest" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="TestName" type="xs:string" minOccurs="1" maxOccurs="1"/>
                    <xs:element name="ExeFile" type="xs:string" minOccurs="1" maxOccurs="1" />
                    <xs:element name="CmdLineArgs" type="xs:string" minOccurs="1" maxOccurs="1" />
                    <xs:element name="StdInFile" type="xs:string" minOccurs="0" maxOccurs="1" />
                    <xs:element name="ExitCode" type="xs:int" minOccurs="0" maxOccurs="1" />
                    <xs:element name="StdOutCompareFile" type="xs:string" minOccurs="0" maxOccurs="1" />
                    <xs:element name="StdErrCompareFile" type="xs:string" minOccurs="0" maxOccurs="1" />
                    <xs:element name="DetailedResultsFile" type="xs:string" minOccurs="0" maxOccurs="1" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
    <xs:key name="InnerTestNameMustBeUnique" msdata:PrimaryKey="true">
      <xs:selector xpath=".//InnerTest" />
      <xs:field xpath="TestName" />
    </xs:key>
  </xs:element>
</xs:schema>
